module.exports = {
    mode: 'development',
    module: {
        rules: [
            {
                test: /index\.js$/,
                use: [
                    {
                        loader: './loaders/text-loader',
                        options: {
                            changeVar: '变量',
                        }
                    }
                ]
            },
            {
                test: /\.css$/,
                use: ['./loaders/style-loader'],
            },
            {
                test: /\.(png)|(jpg)|(gif)$/,
                use: [
                    {
                        loader: './loaders/img-loader',
                        options: {
                            limit: 200000,
                            filename: 'img-[contenthash:5].[ext]',
                        }
                    }
                ]
            },
        ]
    }
}